home *** CD-ROM | disk | FTP | other *** search
- Path: news.unt.edu!zaphod!srt
- From: srt@zaphod.csci.unt.edu (Steve Tate)
- Newsgroups: comp.edu,comp.lang.c,comp.lang.c++
- Subject: Re: C or C++ for a 14-year old?
- Followup-To: comp.edu,comp.lang.c,comp.lang.c++
- Date: 16 Jan 1996 17:04:05 GMT
- Organization: University of North Texas
- Distribution: world
- Message-ID: <4dglq5$ch8@hermes.acs.unt.edu>
- References: <4b30ld$lp2$1@mhafc.production.compuserve.com> <4d4jeh$fv1@wombat.melbpc.org.au> <w+PJjMD4ED1aLz3@dexam.another.gun.de> <4ddsg4$p4e@sundog.tiac.net> <4df9o9$qo0@usc.edu> <9601161206.AA29657@dxmint.cern.ch>
- NNTP-Posting-Host: zaphod.csci.unt.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Dan Pop (danpop@mail.cern.ch) wrote:
- > lerdsuwa@scf.usc.edu (Kriang Lerdsuwanakij) writes:
-
- > >I would also recommend DOS. At least the development tools are better and
- > >easier to use, better online help system. You can write a program,
- > >compile, run and debug right within the compiler.
-
- > That is, unless the buggy program crashes your beloved "operating system"
- > or the bug has a chance to raise its ugly head (many bad pointer accesses
- > are detected only when the "debugged" code is ported to a platform with
- > memory protection).
-
- That's actually the best comment that I've seen in this thread. Last
- semester I taught data structures, which involves programs with lots
- of pointer manipulation. Wanting them to concentrate on data
- structures rather than learning a new language/platform, I was very
- flexible about what language/platform they did their assignments on.
- Most students chose to use C on a PC running DOS. However, I tested
- them all on my UNIX workstation. An absolutely amazing number of
- programs that "worked" on a PC didn't work under UNIX. Why? There
- were pointer problems in their programs that DOS simply wasn't
- catching...
-
- Following an unitialized pointer and reading memory in DOS? No
- problem! Writing to the same more-or-less-random memory location in
- DOS? No problem! Aaaargh...
-
- So programs that had quite severe errors in them looked ok in DOS.
- That's very, very bad especially if you're talking about someone
- trying to learn to program --- they should catch every error possible
- and learn how to correct it.
-
- I learned my lesson. Next time I will require everyone to develop
- their programs under UNIX, and am trying to figure out if "bcc" lives
- up to its claims (it's a "bounds checking C compiler" which is really
- a hacked gcc --- it's supposed to be able to check array bounds,
- pointer references, and things like that. Slows down "production
- code", but fantastic as a teaching/learning tool....). Emacs+bcc+ddd
- (ddd is a nice graphical front end to gdb) -- sounds like a winning
- environment to me, and one that I personally would much prefer to
- anything available under DOS....
-
- --
- Steve Tate --- srt@cs.unt.edu | "As often as a study is cultivated by narrow
- Dept. of Computer Sciences | minds, they will draw from it narrow
- University of North Texas | conclusions." -- John Stuart Mill, 1865.
- Denton, TX 76201 |
-